<script setup>
import { computed } from "vue";
import { useRouter, useRoute } from "vue-router";
import SvgIcon from "../../svgIcon/index.vue";
import { throttle } from "@/unit/function/throttle";
const router = useRouter();
const route = useRoute();
const reload = () => {
  throttle(() => {
    router.replace({
      path: "/redirect" + route.path,
    });
  }, 1000);
};
</script>

<template>
  <a-tooltip arrowPointAtCenter placement="bottom">
    <template #title>
      <span>
        {{ $t("reload") }}
      </span>
    </template>
    <div class="action" @click="reload">
      <SvgIcon name="ReloadOutlined" :style="{ fontSize: '16px' }" />
    </div>
  </a-tooltip>
</template>